#include"processBar.h"

const char* lable = "|/-\\";

void processbar()
{
    
    int len = strlen(lable);
    char bar[NUM];
    memset(bar, '\0', sizeof(bar));
    int cot = 0;
    while(cot <= TOP)
    {
        printf("[%-100s][%d%%][%c]\r", bar, cot, lable[cot%len]);
        fflush(stdout);
        bar[cot++] = BODY;
        if(cot < TOP) bar[cot] = '>';
        usleep(100000);
    }
    printf("\n");
}
